<template>
   <div class="search">
        <div class="search-box">
           <router-link to="/needshop" @click="seteffect">收索你想要的商品</router-link>
        </div>
        <div v-if="sinfo" v-text="sinfo"></div>
   </div>
</template>

<script>
    import { Group, Cell } from 'vux'
    import {mapMutations, mapState, mapGetters} from 'vuex' 
    export default {
       props:["sinfo"],
       methods:{
        seteffect: function() {
            console.log(1);
             this.$store.dispatch('seteffect',{
              effect:"ml0"
            });
        }
       },
       components: {
        Group,
        Cell
       }
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>
    .search {
        font-size: 11px;
        text-align: center;
        .search-box {
            width: 90%;
            margin: 5px auto 2px;
            height: 25px;
            line-height: 25px;
            background-color: #eee;
            border-radius: 25px;

        }
    }
   
</style>
